<?php
/**
 * Created by JetBrains PhpStorm.
 * User: admin
 * Date: 27.01.13
 * Time: 15:44
 * To change this template use File | Settings | File Templates.
 */

class Application_Form_Document extends Zend_Form
{
  public function init()
  {
    $this
      ->setMethod("POST")
      ->setAttrib('name', 'forum_document')
      ->setAction(Zend_Controller_Front::getInstance()->getRouter()->assemble(array()));

    $title = new Zend_Form_Element_Text('title');
    $title->setLabel('Название Документа')
      ->setAttrib('placeholder', 'Название Документа')
      ->addFilter(new Zend_Filter_StringTrim())
      ->setRequired(true);
    $this->addElement($title);


    $body = new Zend_Form_Element_Textarea('body');
    $body->setLabel('Содержание документа')
      ->setRequired(true);
    $this->addElement($body);

    $submit = new Zend_Form_Element_Submit('submit');
    $submit->setLabel('Создать');
    $this->addElement($submit);
  }


}